package com.caesar.exer1;

import java.util.Stack;

/**
 * @author caesar
 * @date 2025/7/18
 * @Description:
 * @apiNote
 *
* 栈的压入方法
* push();
* 栈的判空方法
* isEmpty();
* 栈的弹出方法
* pop();
* */
public class TestMatryoshkaDoll1 {
    public static void main(String[] args) {
        Stack<MatryoshkaDoll> dolls = new Stack<>();
        dolls.push(new MatryoshkaDoll("涂涂",1));
        dolls.push(new MatryoshkaDoll("肥波",2));
        dolls.push(new MatryoshkaDoll("毛毛",3));
        dolls.push(new MatryoshkaDoll("吉吉",4));
        dolls.push(new MatryoshkaDoll("光头强",5));
        dolls.push(new MatryoshkaDoll("熊二",6));
        dolls.push(new MatryoshkaDoll("熊大",7));
        while(!dolls.isEmpty()){
            System.out.println(dolls.pop());
        }
    }
}
